package com.huawei;

import java.util.Scanner;

public class HJ108 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int i =1;
        int result = 0;
        while(true){
            result = a * i;
            if(result%b == 0){
                System.out.println(result);
                return;
            }
            i++;
        }


    }
}
